# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Solar.V1.Model.RoofSegmentSizeAndSunshineStats do
  @moduledoc """
  Information about the size and sunniness quantiles of a roof segment.

  ## Attributes

  *   `azimuthDegrees` (*type:* `number()`, *default:* `nil`) - Compass direction the roof segment is pointing in. 0 = North, 90 = East, 180 = South. For a "flat" roof segment (`pitch_degrees` very near 0), azimuth is not well defined, so for consistency, we define it arbitrarily to be 0 (North).
  *   `boundingBox` (*type:* `GoogleApi.Solar.V1.Model.LatLngBox.t`, *default:* `nil`) - The bounding box of the roof segment.
  *   `center` (*type:* `GoogleApi.Solar.V1.Model.LatLng.t`, *default:* `nil`) - A point near the center of the roof segment.
  *   `pitchDegrees` (*type:* `number()`, *default:* `nil`) - Angle of the roof segment relative to the theoretical ground plane. 0 = parallel to the ground, 90 = perpendicular to the ground.
  *   `planeHeightAtCenterMeters` (*type:* `number()`, *default:* `nil`) - The height of the roof segment plane, in meters above sea level, at the point designated by `center`. Together with the pitch, azimuth, and center location, this fully defines the roof segment plane.
  *   `stats` (*type:* `GoogleApi.Solar.V1.Model.SizeAndSunshineStats.t`, *default:* `nil`) - Total size and sunlight quantiles for the roof segment.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :azimuthDegrees => number() | nil,
          :boundingBox => GoogleApi.Solar.V1.Model.LatLngBox.t() | nil,
          :center => GoogleApi.Solar.V1.Model.LatLng.t() | nil,
          :pitchDegrees => number() | nil,
          :planeHeightAtCenterMeters => number() | nil,
          :stats => GoogleApi.Solar.V1.Model.SizeAndSunshineStats.t() | nil
        }

  field(:azimuthDegrees)
  field(:boundingBox, as: GoogleApi.Solar.V1.Model.LatLngBox)
  field(:center, as: GoogleApi.Solar.V1.Model.LatLng)
  field(:pitchDegrees)
  field(:planeHeightAtCenterMeters)
  field(:stats, as: GoogleApi.Solar.V1.Model.SizeAndSunshineStats)
end

defimpl Poison.Decoder, for: GoogleApi.Solar.V1.Model.RoofSegmentSizeAndSunshineStats do
  def decode(value, options) do
    GoogleApi.Solar.V1.Model.RoofSegmentSizeAndSunshineStats.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Solar.V1.Model.RoofSegmentSizeAndSunshineStats do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
